<%-- 
    Document   : hasilHapus
    Created on : Jun 15, 2011, 5:58:07 AM
    Author     : surya
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
    <body>
                        <%
                        String id = request.getParameter("id_spesies");
                                    if (id != null || id != "all") {
                                        try {
                                            bean.DataBaseConnection conn = new bean.DataBaseConnection();
                                            //for (int idx = 0; idx < path.length; idx++) {
                                            String query = "DELETE from spesies WHERE name_spesies='"+id+"'";
                                            java.sql.Statement statement = conn.getConnection().createStatement();
                                            statement.executeUpdate(query);
                                            statement.close();
                                            
                                            response.sendRedirect("penulis_delete.jsp?id_filum=all&id_class=all&id_ordo=all&id_familia=all&id_spesies=all");

                                            }
                                        catch (Exception ex) {
                                            System.out.println("message: " + ex.getMessage());
                                        }
                                    } else {
                                        response.sendRedirect("error.jsp?error=yes");
                                    }
                        %>
    </body>
</html>
